package com.nimitz.pollution.service.impl;

import com.nimitz.pollution.domain.Pollution;
import com.nimitz.pollution.mapper.PollutionMapper;
import com.nimitz.pollution.service.PollutionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PollutionServiceImpl implements PollutionService {
    @Autowired
    private PollutionMapper pollutionMapper;
    @Override
    public List<Pollution> getPollutionsForPagination(Pollution pollution) {
        return pollutionMapper.getPollutionsForPagination(pollution);
    }

    @Override
    public int addPollution(Pollution pollution) {
        return pollutionMapper.addPollution(pollution);
    }

    @Override
    public Pollution selectPollutionById(Long id) {
        return pollutionMapper.selectPollutionId(id);
    }


    @Override
    public void updatePollution(Pollution pollution) {
        pollutionMapper.updatePollution(pollution);
    }

    @Override
    public void deletePollution(Long id) {
        pollutionMapper.deletePollution(id);
    }

}
